package request

// 添加砍价活动
type CreateCutPriceActivityReq struct {
	Title     string `json:"title" form:"title" binding:"required"`
	Image     string `json:"image" form:"image" binding:"required"`
	StartTime string `json:"startTime" form:"startTime" binding:"required"`
	StopTime  string `json:"stop_time" form:"stop_time" binding:"required"`
	Info      string `json:"info" form:"info" binding:"required"`
	Rule      string `json:"rule" form:"rule" binding:"required"`
	JoinNum   int64  `json:"join_num" form:"join_num" binding:"required"`
}

// 添加砍价商品
type AddCutGoods struct {
	GoodsId     int64   `form:"goods_id" binding:"required"  json:"goods_id"`
	ActivityId  int64   `form:"activity_id" binding:"required"  json:"activity_id"`
	Stock       int64   `form:"stock" binding:"required"  json:"stock"`
	CutMaxPrice float32 `form:"cut_max_price" binding:"required"  json:"cut_max_price"`
	CutMinPrice float32 `form:"cut_min_price" binding:"required"  json:"cut_min_price"`
	CutNum      int64   `form:"cut_num" binding:"required"  json:"cut_num"`
	MinPrice    float32 `form:"min_price" binding:"required"  json:"min_price"`
	MinPerson   int64   `form:"min_person" binding:"required"  json:"min_person"`
	MaxPerson   int64   `form:"max_person" binding:"required"  json:"max_person"`
	MaxBuy      int64   `form:"max_buy" binding:"required"  json:"max_buy"`
	MinBuy      int64   `form:"min_buy" binding:"required"  json:"min_buy"`
}

// 获取砍价活动id
type GetCutActivityIdReq struct {
	ActivityId int64 `form:"activity_id" binding:"required" json:"activity_id"`
}

// 帮砍价
type HelpCutPriceReq struct {
	UserId         int64  `form:"user_id" binding:"required"  json:"user_id"`
	InvitationCode string `form:"invitation_code" binding:"required"  json:"invitation_code"`
}

// 用户参加砍价活动
type UserJoinCutActivityReq struct {
	UserId  int64 `form:"user_id" binding:"required"  json:"user_id"`
	GoodsId int64 `form:"goods_id" binding:"required"  json:"goods_id"`
	Num     int64 `form:"num" binding:"required"  json:"num"`
}

// 邀请码生成
type GetCutInvitationCode struct {
	UserId  int64 `form:"user_id" binding:"required"  json:"user_id"`
	GoodsId int64 `form:"goods_id" binding:"required"  json:"goods_id"`
	JoinId  int64 `form:"join_id" binding:"required"  json:"join_id"`
}

// 获取砍价商品id
type GetCutGoodsId struct {
	Id int64 `form:"id" binding:"required" json:"id"`
}

// 状态查询砍价活动
type CutActivityStatusReq struct {
	Status int64 `form:"status"  json:"status"`
}

// 修改活动
type UpdateCutActivityReq struct {
	Id        uint32 ` form:"id" binding:"required" json:"id"`
	Title     string ` form:"title"  json:"title"`
	Image     string ` form:"image"  json:"image"`
	StartTime string ` form:"start_time"  json:"start_time"`
	StopTime  string ` form:"stop_time"  json:"stop_time"`
	Info      string ` form:"info"  json:"info"`
	Rule      string ` form:"rule"  json:"rule"`
	Status    int8   ` form:"status"  json:"status"`
}

// 修改砍价商品
type UpdateCutGoodsReq struct {
	Id          uint32  `form:"id" binding:"required" json:"id"`
	ActivityId  int32   `form:"activity_id"  json:"activity_id"`
	GoodsId     int32   `form:"goods_id"  json:"goods_id"`
	GoodsName   string  `form:"goods_name"  json:"goods_name"`
	GoodsImg    string  `form:"goods_img"  json:"goods_img"`
	Stock       int32   `form:"stock"  json:"stock"`
	Desc        string  `form:"desc"  json:"desc"`
	BasePrice   float64 `form:"base_price"  json:"base_price"`
	CutMaxPrice float64 `form:"cut_max_price"  json:"cut_max_price"`
	CutMinPrice float64 `form:"cut_min_price"  json:"cut_min_price"`
	CutNum      int32   `form:"cut_num"  json:"cut_num"`
	IsMyCut     int8    `form:"is_my_cut"  json:"is_my_cut"`
	MinPrice    float64 `form:"min_price"  json:"min_price"`
	MaxPerson   int32   `form:"max_person"  json:"max_person"`
	MinPerson   int32   `form:"min_person"  json:"min_person"`
	MaxBuy      int32   `form:"max_buy"  json:"max_buy"`
	MinBuy      int32   `form:"min_buy"  json:"min_buy"`
}
